package com.ruoyi.project.dj.domain;

import com.ruoyi.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 学习记录对象 dj_study_record
 *
 * @author ruoyi
 * @date 2025-09-15
 */
public class DjStudyRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 记录ID */
    private Long id;

    /** 党员ID */
    private Long memberId;

    /** 资源类型：video-视频，material-材料，audio-有声读物，book-红色书籍，realtime-实时资料 */
    private String resourceType;

    /** 资源ID */
    private Long resourceId;

    /** 学习时长(秒) */
    private Integer duration;

    /** 学习进度(百分比) */
    private Integer progress;

    /** 是否完成：1-是，0-否 */
    private Integer isComplete;

    /** 上次学习位置(秒) */
    private Integer lastPosition;

    /** 收藏状态：1-已收藏，0-未收藏 */
    private Integer collectStatus;

    /** 最后学习时间 */
    private Date lastStudyTime;

    /** 创建时间 */
    private Date createTime;

    /** 更新时间 */
    private Date updateTime;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setMemberId(Long memberId)
    {
        this.memberId = memberId;
    }

    public Long getMemberId()
    {
        return memberId;
    }
    public void setResourceType(String resourceType)
    {
        this.resourceType = resourceType;
    }

    public String getResourceType()
    {
        return resourceType;
    }
    public void setResourceId(Long resourceId)
    {
        this.resourceId = resourceId;
    }

    public Long getResourceId()
    {
        return resourceId;
    }
    public void setDuration(Integer duration)
    {
        this.duration = duration;
    }

    public Integer getDuration()
    {
        return duration;
    }
    public void setProgress(Integer progress)
    {
        this.progress = progress;
    }

    public Integer getProgress()
    {
        return progress;
    }
    public void setIsComplete(Integer isComplete)
    {
        this.isComplete = isComplete;
    }

    public Integer getIsComplete()
    {
        return isComplete;
    }
    public void setLastPosition(Integer lastPosition)
    {
        this.lastPosition = lastPosition;
    }

    public Integer getLastPosition()
    {
        return lastPosition;
    }
    public void setCollectStatus(Integer collectStatus)
    {
        this.collectStatus = collectStatus;
    }

    public Integer getCollectStatus()
    {
        return collectStatus;
    }
    public void setLastStudyTime(Date lastStudyTime)
    {
        this.lastStudyTime = lastStudyTime;
    }

    public Date getLastStudyTime()
    {
        return lastStudyTime;
    }
    public void setCreateTime(Date createTime)
    {
        this.createTime = createTime;
    }

    public Date getCreateTime()
    {
        return createTime;
    }
    public void setUpdateTime(Date updateTime)
    {
        this.updateTime = updateTime;
    }

    public Date getUpdateTime()
    {
        return updateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("memberId", getMemberId())
            .append("resourceType", getResourceType())
            .append("resourceId", getResourceId())
            .append("duration", getDuration())
            .append("progress", getProgress())
            .append("isComplete", getIsComplete())
            .append("lastPosition", getLastPosition())
            .append("collectStatus", getCollectStatus())
            .append("lastStudyTime", getLastStudyTime())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}